﻿using System;
using UnityEngine;
using UnityEngine.UI;


public class CharacterCell : MonoBehaviour
    {
        public CharacterSqliteData CharacterData;

        private void Start()
        {
            Init();
        }

        private void Init()
        {
            transform.Find("txtName").GetComponent<Text>().text = CharacterData.Name;
            transform.Find("txtAge").GetComponent<Text>().text = $"年龄：{CharacterData.Age}";
            transform.Find("txtSex").GetComponent<Text>().text =$"性别：{(CharacterData.Sex?"男":"女")}";
            transform.Find("txtHeight").GetComponent<Text>().text = $"身高：{CharacterData.Height}";
        }
    }
